package pers.qianyu.module.security.exception;

import pers.qianyu.exception.*;

/**
 * @author mizzle rain
 * @date 2020-11-11 10:33
 */
public enum SecurityErrorCodeEnum implements ILambErrorCodeEnum {
    EMPTY_TOKEN(4000, "请先登录之后再进行访问"),
    INVALID_PERMISSION(4001, "对不起，你没有权限操作"),
    INVALID_TOKEN(4002, "对不起，你的 token 无效"),
    ;
    private final Integer code;
    private final String message;

    SecurityErrorCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public String getMessage() {
        return message;
    }

    @Override
    public Integer getCode() {
        return code;
    }
}
